<?php
/*Test en utilisant XMLWriter*/
$writer = new XMLWriter();
// Output directly to the user
//$xml->openURI('test3.xml');
$writer->openMemory();
$writer->startDocument('1.0');
$writer->setIndent(true);

$writer->startElement('itineraire');
//~ $xml->writeAttribute(�version�, �2.0'); // Pour �crire un attribut
    $writer->startElement('etape');
        $writer->writeElement("lieu_rdv", "1");
        $writer->writeElement("lieu_date", "2");
        $writer->writeElement("h_arrivee", "3");
        $writer->writeElement("h_rdv","4");
        $writer->writeElement("h_depart", "5");
        $writer->writeElement("intitule_sejouradresse", "6");
    $writer->endElement();

$writer->endElement();
$writer->endDocument();

//$xml->flush();

print $writer->outputMemory();
?>